--- ../tk4.1/generic/tkEntry.c	Wed Mar 27 14:53:26 1996
+++ tkEntry.c	Mon Jul  8 19:24:11 1996
@@ -13,6 +13,12 @@
  *
  * SCCS: @(#) tkEntry.c 1.101 96/03/21 13:55:45
  */
+/*
+ * TkSTEP modifications Copyright
+ * by Alfredo K. Kojima 
+ */ 
+
+
 
 #include "default.h"
 #include "tkPort.h"
@@ -48,7 +54,7 @@
      */
 
     Tk_3DBorder normalBorder;	/* Used for drawing border around whole
-				 * window, plus used for background. */
+				 * window, nor more used for background */    
     int borderWidth;		/* Width of 3-D border around window. */
     int relief;			/* 3-D effect: TK_RELIEF_RAISED, etc. */
     XFontStruct *fontPtr;	/* Information about text font, or NULL. */
@@ -73,7 +79,7 @@
     int highlightWidth;		/* Width in pixels of highlight to draw
 				 * around widget when it has the focus.
 				 * <= 0 means don't draw a highlight. */
-    XColor *highlightBgColorPtr;
+    XColor *highlightBgColorPtr; 
 				/* Color for drawing traversal highlight
 				 * area when highlight is off. */
     XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
@@ -169,6 +175,20 @@
 #define XPAD 1
 #define YPAD 1
 
+#define MAX_INTENSITY 65535
+
+
+/*
+ * If you want to make Tk ignore attribute settings that may be violating
+ * NEXTSTEP(tm) styles leave DISABLE_FORCE_STEP undef'ed, otherwise define it
+ * somewhere
+ */
+#ifndef DISABLE_FORCE_STEP
+#  define DISABLE_CHANGE	TK_CONFIG_DONT_CHANGE_DEFAULT
+#else
+#  define DISABLE_CHANGE	0
+#endif
+
 /*
  * Information used for argv parsing.
  */
@@ -176,16 +196,16 @@
 static Tk_ConfigSpec configSpecs[] = {
     {TK_CONFIG_BORDER, "-background", "background", "Background",
 	DEF_ENTRY_BG_COLOR, Tk_Offset(Entry, normalBorder),
-	TK_CONFIG_COLOR_ONLY},
+	TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_BORDER, "-background", "background", "Background",
 	DEF_ENTRY_BG_MONO, Tk_Offset(Entry, normalBorder),
-	TK_CONFIG_MONO_ONLY},
+	TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
 	(char *) NULL, 0, 0},
     {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
 	(char *) NULL, 0, 0},
     {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
-	DEF_ENTRY_BORDER_WIDTH, Tk_Offset(Entry, borderWidth), 0},
+	DEF_ENTRY_BORDER_WIDTH, Tk_Offset(Entry, borderWidth), DISABLE_CHANGE},
     {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
 	DEF_ENTRY_CURSOR, Tk_Offset(Entry, cursor), TK_CONFIG_NULL_OK},
     {TK_CONFIG_BOOLEAN, "-exportselection", "exportSelection",
@@ -196,23 +216,26 @@
     {TK_CONFIG_FONT, "-font", "font", "Font",
 	DEF_ENTRY_FONT, Tk_Offset(Entry, fontPtr), 0},
     {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
-	DEF_ENTRY_FG, Tk_Offset(Entry, fgColorPtr), 0},
+	DEF_ENTRY_FG, Tk_Offset(Entry, fgColorPtr), DISABLE_CHANGE},
     {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
 	"HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG,
-	Tk_Offset(Entry, highlightBgColorPtr), 0},
+	Tk_Offset(Entry, highlightBgColorPtr), DISABLE_CHANGE},
     {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
-	DEF_ENTRY_HIGHLIGHT, Tk_Offset(Entry, highlightColorPtr), 0},
+	DEF_ENTRY_HIGHLIGHT, Tk_Offset(Entry, highlightColorPtr), 
+	DISABLE_CHANGE},
     {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
 	"HighlightThickness",
-	DEF_ENTRY_HIGHLIGHT_WIDTH, Tk_Offset(Entry, highlightWidth), 0},
+	DEF_ENTRY_HIGHLIGHT_WIDTH, Tk_Offset(Entry, highlightWidth), 
+        DISABLE_CHANGE},
     {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground",
-	DEF_ENTRY_INSERT_BG, Tk_Offset(Entry, insertBorder), 0},
+	DEF_ENTRY_INSERT_BG, Tk_Offset(Entry, insertBorder),
+        DISABLE_CHANGE},
     {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth",
 	DEF_ENTRY_INSERT_BD_COLOR, Tk_Offset(Entry, insertBorderWidth),
-	TK_CONFIG_COLOR_ONLY},
+	TK_CONFIG_COLOR_ONLY|DISABLE_CHANGE},
     {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth",
 	DEF_ENTRY_INSERT_BD_MONO, Tk_Offset(Entry, insertBorderWidth),
-	TK_CONFIG_MONO_ONLY},
+	TK_CONFIG_MONO_ONLY|DISABLE_CHANGE},
     {TK_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime",
 	DEF_ENTRY_INSERT_OFF_TIME, Tk_Offset(Entry, insertOffTime), 0},
     {TK_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime",
@@ -222,25 +245,25 @@
     {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justify",
 	DEF_ENTRY_JUSTIFY, Tk_Offset(Entry, justify), 0},
     {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
-	DEF_ENTRY_RELIEF, Tk_Offset(Entry, relief), 0},
+	DEF_ENTRY_RELIEF, Tk_Offset(Entry, relief), DISABLE_CHANGE},
     {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
 	DEF_ENTRY_SELECT_COLOR, Tk_Offset(Entry, selBorder),
-	TK_CONFIG_COLOR_ONLY},
+	TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
 	DEF_ENTRY_SELECT_MONO, Tk_Offset(Entry, selBorder),
-	TK_CONFIG_MONO_ONLY},
+	TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth",
 	DEF_ENTRY_SELECT_BD_COLOR, Tk_Offset(Entry, selBorderWidth),
-	TK_CONFIG_COLOR_ONLY},
+	TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth",
 	DEF_ENTRY_SELECT_BD_MONO, Tk_Offset(Entry, selBorderWidth),
-	TK_CONFIG_MONO_ONLY},
+	TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
 	DEF_ENTRY_SELECT_FG_COLOR, Tk_Offset(Entry, selFgColorPtr),
-	TK_CONFIG_COLOR_ONLY},
+	TK_CONFIG_COLOR_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
 	DEF_ENTRY_SELECT_FG_MONO, Tk_Offset(Entry, selFgColorPtr),
-	TK_CONFIG_MONO_ONLY},
+	TK_CONFIG_MONO_ONLY | DISABLE_CHANGE},
     {TK_CONFIG_STRING, "-show", "show", "Show",
 	DEF_ENTRY_SHOW, Tk_Offset(Entry, showChar), TK_CONFIG_NULL_OK},
     {TK_CONFIG_UID, "-state", "state", "State",
@@ -880,6 +903,9 @@
     }
 
     oldExport = entryPtr->exportSelection;
+    if (Tk_StrictMotif(entryPtr->tkwin)) {
+	flags|=TK_CONFIG_CHECK_MY_FLAG;
+    }        
     if (Tk_ConfigureWidget(interp, entryPtr->tkwin, configSpecs,
 	    argc, argv, (char *) entryPtr, flags) != TCL_OK) {
 	return TCL_ERROR;
@@ -1046,9 +1072,13 @@
      * layers are:  normal background, selection background, and
      * insertion cursor background.
      */
-
+/*
     Tk_Fill3DRectangle(tkwin, pixmap, entryPtr->normalBorder,
 	    0, 0, Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT);
+ */
+    XFillRectangle(entryPtr->display, pixmap, 
+	Tk_3DBorderGC(entryPtr->tkwin, entryPtr->normalBorder, TK_3D_LIGHT_GC),
+	0,0, Tk_Width(tkwin), Tk_Height(tkwin));
     if (entryPtr->displayString == NULL) {
 	displayString = entryPtr->string;
     } else {
